package com.six.epidemic.admin.entity;

import com.baomidou.mybatisplus.annotation.IdType
import com.baomidou.mybatisplus.annotation.TableField
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import com.gitee.sunchenbin.mybatis.actable.annotation.*
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlCharsetConstant
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlEngineConstant
import java.io.Serializable
import java.util.*

@TableName("epidemicadmin")
@Table(value = "epidemicadmin", comment = "疫情上報管理員")
@TableCharset(MySqlCharsetConstant.UTF8)
@TableEngine(MySqlEngineConstant.InnoDB)
class EpidemicAdmin : Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    @IsKey
    @Column(comment = "主键id", isAutoIncrement = true)

    var id: Long = 0   //主键ID

    @Column(name = "username", isNull = false)
    @TableField(value = "username")
    var username: String = ""    //用户名称

    @Column(name = "userpwd", isNull = false)
    @TableField(value = "userpwd")
    var userpwd: String = ""    //用户密码

    @Column(name = "provinces", isNull = false)
    @TableField(value = "provinces")
    var provinces: String = ""  //所在省市区(县)

    @Column(name = "address", isNull = false)
    @TableField(value = "address")
    var address: String = "" //详细地址

    @Column(name = "ustate", isNull = false)
    @TableField(value = "ustate")
    var ustate: Int = 0  //用户状态0禁用1正常

    @Column(name = "regtime", isNull = false)
    @TableField(value = "regtime")
    var regtime: Date = Date()  //注册时间

    @Column(name = "lastlogintime", isNull = false)
    @TableField(value = "lastlogintime")
    var lastlogintime: Date = Date() //最后登录时间

    @Column(name = "utype", isNull = false)
    @TableField(value = "utype")
    var utype: Int = 1  //用户类型0超级管理员，1一般管理员
    override fun toString(): String {
        return "EpidemicAdmin(id=$id, username='$username', userpwd='$userpwd', provinces='$provinces', address='$address', ustate=$ustate, regtime=$regtime, lastlogintime=$lastlogintime, utype=$utype)"
    }


}
